import request from "../../utils/request";
enum API {
  //登录接口获取token
  reqUserLogin = "/user/passport/login",
  //获取手机验证码
  reqGetUserCode = "/user/passport/sendCode/",
  //注册
  reqUserRegister = "/user/passport/register",
  //获取用户信息
  reqUserInfo = "/user/passport/auth/getUserInfo",
}
//登录
export const reqlogintoken = (data: any) =>
  request.post(API.reqUserLogin, data);
//验证码
export const reqGetUserCode = (phone: any) =>
  request.get(API.reqGetUserCode + `${phone}`);
//注册
export const reqUserRegister = (data: any) =>
  request.post(API.reqUserRegister, data);
//获取用户信息
export const reqUserInfo = () =>
  request.get(API.reqUserInfo);
